Skip to content

ImageScript 4.0 - #84

Merged
matmen merged 314 commits into
masterfrom
v4
Nov 20, 2026
Merged

matmen merged 314 commits into
masterfrom
v4

Conversation

@matmen

@matmen matmen commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

The 4.0 line: everything 3.x deprecated is removed, the API takes options objects, and seventeen behaviors change.
master (3.20.3) is merged in, so this merges cleanly. A draft until 4.0.0.

Before 4.0.0:

  • feedback on rc.5
  • the README's migration link points at master
  • 3.x maintenance branch cut from 3.20.3
  • docs site switched

matmen added 30 commits November 8, 2026 22:26
…alMode, RenderSVGOptions and TextStyleOptions
Changes that would be breaking after 4.0, made now:

- invalid choices (resize mode, blend mode, flip direction, disposal
  mode, wrapStyle) throw a TypeError naming the valid ones; the resize
  mode is checked before anything changes
- colors are integers from -2^31 to 2^32 - 1 (fill() functions' too),
  coordinates are truncated without wrapping at 2^32, compression is an
  integer 0-9, Colors.gradient() throws for NaN with any number of stops
- the bitmap setter refuses views that aren't 4-byte aligned instead of
  copying them
- frame offsets are truncated to integers like image sizes; frame
  durations a format can't store throw like loop counts (merged frames
  are split at the limit); encodeGIF() without frames throws
- encoders write no creation time unless one is given, and 'ImageScript'
  without the version as the default software (src/version.ts is gone)
- renderSVG(): maxLayerPixels (default 4 * maxPixels) bounds the layers
  alive at once, maxImagePixels (default maxPixels) the embedded images
  together; drawing an image that is missing, broken or over the limit
  throws
- renderText(): maxPixels, counting the outline
Values that are overwritten before they are read, and a final increment nobody reads (eslint 10's no-useless-assignment).
eslint 9 is no longer supported. minimatch and glob are overridden to the versions without GHSA-g3hv-75wg-m249 and GHSA-3g3m-2fjr-6pw4, except for typedoc, which needs minimatch 9 (typedoc stays on 0.27: 0.28 has the same dependency).
As a project document it turned the docs into a module "index": every page was prefixed with it (classes/index.Image.html instead of classes/Image.html), breaking the links to imagescript.dev.
imagescript.dev only gets the docs of final releases, so the link was a 404 for the release candidates.
Without a permissions block the jobs got the repository's default token, with write access to contents, packages, actions and more.
--with-deps only added fonts the tests don't use, and failed the browser job four times in a row while the runner couldn't resolve the Ubuntu mirrors.
npm warns that esbuild's and workerd's postinstall scripts aren't covered by allowScripts; they only check binaries that come with the platform packages, and the tests pass without them.
…ame renderSVG and renderText with their class
…time and keep textPaths on long paths working
@matmen
matmen merged commit 5cc22ba into master Nov 20, 2026
11 checks passed
@matmen
matmen deleted the v4 branch November 20, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant